home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 090 / redirect.arc / REDIRECT.TXT
Encoding:
Text File  |  1986-11-30  |  12.0 KB  |  224 lines

  1.      In the Public Domain                               Number 1
  2.      by Dwight K. Illk                         November 30, 1986
  3.      --
  4.      Reviews and comments about Public Domain and User Supported
  5.      Software for the IBM-PC and Compatibles
  6.      --
  7.      (C)Copyright Dwight K. Illk 1986
  8.      --
  9.      Permission is granted for unlimited distribution for non-
  10.      commercial purposes.
  11.      ===========================================================
  12.                       PRINTER REDIRECTION UNDER
  13.                              PC-DOS 3.1 (1)
  14.      --
  15.           A program that redirects printer output to a disk file
  16.      can be quite useful.  It can save paper, supplies and prin-
  17.      ter wear and tear. You can "print" to a disk file now to
  18.      save time and actually print the file later when it is more
  19.      convenient, or perhaps, on another computer.  You can debug
  20.      programs that produce printed output by "printing" to a file
  21.      which can then be analyzed for control characters and escape
  22.      sequences that affect printed output.  You can also produce
  23.      files to edit with your word processor from programs that
  24.      are designed to produce only printed output.
  25.           Public domain authors have come through again with many
  26.      programs designed to give these benefits, but I found when
  27.      "upgrading" to PC-DOS v 3.1, that these programs no longer
  28.      worked on my IBM-PC/XT as they had before.  In general, the
  29.      programs I had been using "hang" the computer the first time
  30.      they write to the disk file forcing me to reach for the big
  31.      red switch.  I have evaluated several Public Domain (PD)
  32.      programs trying to find one that "does everything".  I have
  33.      not been fully successful but with the combination of three
  34.      such programs, LPTx v 3.0, PR2FL v 1.0 and LPT2DSK v 1.0,
  35.      you can cover most, or maybe all, of the bases.
  36.      --
  37.      NOTE: BOTH LPTx AND PR2FL WORK BETTER THAN DESCRIBED HERE
  38.      WHEN USING DOS 2.x!
  39.      --
  40.           LPTx v 3.0 was written and copyrighted by Mark DiVec-
  41.      chio, a computer systems consultant in San Diego.   He gives
  42.      permission in the documentation to "use and freely dis-
  43.      tribute this program for non-commercial applications."  For
  44.      the techies in the crowd, LPTx works by capturing the BIOS
  45.      interrupt 17h vector for LPTn and redirecting the data to a
  46.      disk file.  Mark also provides the assembly code for those
  47.      of you who would like to make "improvements".  LPTx has many
  48.      excellent features such as the ability to redirect the out-
  49.      put for LPT1, LPT2 and/or LPT3 to separate files at the same
  50.      time, on-line help by typing "LPTx ?", a status report by
  51.      typing "LPTx", creation of default filenames if you chose
  52.      not to specify your own, and giving warning before it over-
  53.      writes an existing file.
  54.           With LPTx, you can even TYPE the print file while the
  55.      LPTx redirection is still active.  If you do this, you will
  56.      find that the last little bit of the file may be missing be-
  57.      cause it is still in the memory buffer.  LPTX worked well
  58.      with all of my "memory resident" utilities loaded, and I
  59.      have a bunch of them!  In his efforts to improve LPTx, Mark
  60.      has issued several other versions.  Some of them may perform
  61.      differently than the version 3.0 described here, but none of
  62.      them (through version 5.0) function perfectly under DOS 3.1. (2)
  63.      --
  64.           Running on a IBM-PC/XT under PC-DOS 3.1, LPTx shapes up
  65.      as follows.
  66.      --
  67.      On the up side:
  68.      <Shift><PrtSc>  This works great! (3)
  69.      DOS PRINT       DOS PRINT command works fine.  (e.g. "PRINT
  70.                      LPTx.DOC")
  71.      QMODEM (4)      If you use <Ctrl><PrtSc> in QMODEM v. 2.3,
  72.                      data is correctly captured to the file.
  73.      LOTUS 1-2-3 (5) Spreadsheet information sent to the printer
  74.                      by LOTUS 1-2-3 rel 2.0  is correctly cap-
  75.                      tured in the print file.
  76.      --
  77.      On the down side:
  78.      <Ctrl><PrtSc>   If you use <Ctrl><PrtSc> to toggle on the
  79.                      printer while LPTx is active, the system
  80.                      hangs the first time that LPTx tries to
  81.                      write to disk and you must power down the
  82.                      computer to get going again.  You can't even
  83.                      use <Ctrl><Alt><Del> to recover.  When you
  84.                      reboot your computer, the print file WILL
  85.                      contain the last record written.
  86.      DOS REDIRECTION If you use DOS redirection to get output to
  87.                      the printer, the system hangs on the first
  88.                      disk write (e.g. "TYPE LPTX.DOC >PRN:").
  89.      BASIC           If you try to run a BASIC program that uses
  90.                      LPRINT commands, the system hangs as
  91.                      described above.
  92.      dBASE III PLUS  When trying to redirect printed reports from
  93.                      dBASE III PLUS (6) to a disk file, the system
  94.                      hangs.
  95.      -----------------------------------------------------------
  96.           The copy of PR2FL (Print to File) that I have is v 1.0
  97.      written by Jim Kyle on May 29, 1985 and modified by Lew
  98.      Paper on October 29, 1985.  Jim is a SysOp of the Computer
  99.      Language Magazine (CLM) SIG on the Compuserve Information
  100.      Service (CIS).  He says that Lew's revision is NECESSARY to
  101.      handle pathnames in the file specification correctly.  The
  102.      assembly source code is available on the CIS CLM.  PR2FL is
  103.      released to the public domain without restriction.  It works
  104.      by redirecting the PRN: device to a file and starting a new
  105.      copy of COMMAND.COM.  The documentation for this program is
  106.      excellent.  PR2FL has the definite advantage on NOT locking
  107.      up the system when it doesn't work.  PR2FL does not put a ^Z
  108.      end-of-file marker when it closes the print file, so there
  109.      may be extra "garbage" at the end of the file when you list
  110.      it.  On the other hand, a ^Z in the print stream will be in-
  111.      cluded in the file which may make the TYPE command stop too
  112.      soon when listing the file.  In general, if you try to TYPE
  113.      the print file while PR2FL redirection is active, it will
  114.      appear to be be empty.
  115.           Again on the IBM-PC/XT using DOS 3.1, PR2FL did the
  116.      following.
  117.      --
  118.      On the up side:
  119.      <Ctrl><PrtSc>   If you toggle on the printer while using
  120.                      PR2FL, whatever scrolls across the screen is
  121.                      correctly captured to the print file.
  122.      BASIC           Output from LPRINT statements in BASIC are
  123.                      correctly routed to the print file.
  124.      QMODEM          Output routed to the printer using the
  125.                      <Ctrl<PrtSc> from within QMODEM is correctly
  126.                      sent to the print file.
  127.      dBASE III PLUS  Printed report output is redirected to the
  128.                      disk file just fine.  This will be a BIG
  129.                      boon to many dBASE III PLUS users.
  130.      --
  131.      On the down side:
  132.      <Shift><PrtSc>  Output goes to the printer rather than to
  133.                      the print file.
  134.      DOS PRINT       Output goes to the printer.
  135.      LOTUS 1-2-3     Output goes to the printer.
  136.      DOS REDIRECTION Output redirected to >PRN: goes to the prin-
  137.                      ter rather than the print file.
  138.      -----------------------------------------------------------
  139.           George Bouche, a professional programmer in Lubboch,
  140.      Texas, modestly calls his LPT2DSK v 1.0 public domain
  141.      program a very simple COBOL utility.  It works by opening a
  142.      buffer of up to 64K in memory, intercepting the BIOS 17h in-
  143.      terrupt and invoking a new COMMAND.COM.  Output for the
  144.      specified printer is placed in the buffer while data
  145.      directed to other printers is passed through.  When you EXIT
  146.      the daughter COMMAND.COM level, the buffer is written to the
  147.      print file.  The program had no problem running with a full
  148.      compliment of memory resident utilities and never caused a
  149.      system crash.  LPT2DSK also offers the interesting pos-
  150.      sibility of redirecting output from one printer to another
  151.      printer.
  152.           Testing LPT2DSK v 1.0 under the same conditions as the
  153.      above programs, the following results were obtained.
  154.      --
  155.      On the up side:
  156.      <Shift><PrtSc>  Works great!
  157.      <Ctl><PrtSc>    Works great!
  158.      DOS PRINT       Works great!
  159.      DOS REDIRECTION Works great!
  160.      BASIC LPRINT    Works great!  (See a trend here?)
  161.      LOTUS 1-2-3     Works great!
  162.      QMODEM          Works great!
  163.      --
  164.      On the down side:
  165.      dBASE III PLUS  Whoops - when trying to "print" a report,
  166.                      dBASE reports a "Printer not ready." error
  167.                      message, but the system DOES NOT hang.
  168.      -----------------------------------------------------------
  169.           LPT2DSK is the most versatile of the programs reviewed
  170.      here.  If you need to print dBASE III PLUS files, you should
  171.      also get PR2FL.  If you want to print files larger than 64K
  172.      (could happen with graphics programs), you might want to try
  173.      LPTx or PR2FL.  PR2FL correctly handles most situations that
  174.      LPTx does not; however, it does not correctly handle the
  175.      functions that LPTx does well!
  176.           I want to express my personal appreciation to George
  177.      Bouche, Mark DiVecchio and Jim Kyle.  Not only have they un-
  178.      selfishly shared their work with the rest of us, but they
  179.      were extremely informative and cooperative in helping me
  180.      gather information for this article.
  181.           All of the public domain and User Supported programs
  182.      discussed in this article may be obtained from the Terrapin
  183.      Data Systems BBS (612/623-0152).
  184.           If you have written or know of a public domain program
  185.      that performs these functions better than the ones
  186.      described here, or you find that I have made an error (7),
  187.      please leave a message on Terrapin Data Systems BBS or write
  188.      me at 6924 Stratford Draw, Woodbury MN 55125.  I regret that
  189.      in general, I will be unable to reply to letters.
  190.      --------------------- Footnotes --------------------------
  191.      (1) The IBM Personal Computer DOS Version 3.10, (C)Copyright
  192.      International Business Machines Corp 1981, 1985,
  193.      (C)Copyright Microsoft Corp 1981, 1985
  194.  
  195.      (2) Mark is very interested in improving LPTx so that it will
  196.      work correctly with DOS 3.x in all cases.  He has invites
  197.      anyone that has information that may help to contact him at
  198.      10435 Mountain Glen Terrace, San Diego, CA, 92131.
  199.  
  200.      (3) When you TYPE the file produced it is double spaced on
  201.      the screen  because the TYPE command uses the BIOS interrupt
  202.      10h routine which automatically adds a <CR><LF> when a
  203.      character is displayed in column 80.  All lines in the
  204.      screen print are 80 characters long, so the BIOS adds a
  205.      <CR><LF> to the end of each one.  Then the <LF>CR> actually
  206.      in the file causes a blank line.
  207.  
  208.      (4) Testing printer redirection programs with QMODEM is
  209.      academic since it already has excellent capture to disk
  210.      capabilities.  QMODEM is a fine user supported communica-
  211.      tions program copyrighted by The Forbin Project and John
  212.      Friel III.  It can be obtained from The Forbin Project BBS
  213.      (612/824-8167) and the author requests a $30.00 registration
  214.      fee if you like QMODEM and continue to use it.
  215.  
  216.      (5) LOTUS 1-2-3 is a commercial program copyrighted by Lotus
  217.      Development Corporation.
  218.  
  219.      (6) dBASE III PLUS v 1.0 is a commercial data base management
  220.      program copyrighted by Ashton-Tate.
  221.  
  222.      (7) I regret that I am subject to human error despite my ef-
  223.      forts to avoid it and refuse to be responsible!
  224.